#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<stdbool.h>
#define MAX 100
#define M  0x7FFFFFFF
typedef char x;
typedef int y;
typedef struct fig {
	x a[MAX];
	y b[MAX][MAX];
	int c;
	int d;
}F;